from django.db import models

# Create your models here.
class device(models.Model):

    id=models.AutoField(primary_key=True)
    serial_no=models.CharField(max_length=50,unique=True,null=False,verbose_name='字符串(50)')
    name = models.CharField(max_length=100,null=False,verbose_name='字符串(100)')
    type = models.CharField(max_length=50,null=False,verbose_name='字符串(50')
    location = models.CharField(max_length=200,verbose_name='字符串(200)')
    status = models.IntegerField(choices=[(0,'正常'),(1,'维修'),(2,'报废')],verbose_name='整型')
    purchase_date = models.DateTimeField(auto_now_add=True,verbose_name='购买日期')
    last_check = models.DateTimeField()